package com.badibadi.activity;

import java.util.List;

import com.badibadi.adapter.MyViewPageAdapter;
import com.badibadi.uniclubber.R;
import com.badibadi.uniclubber.R.id;
import com.badibadi.uniclubber.R.layout;
//import com.lidroid.xutils.util.LogUtils;

import android.os.Bundle;
import android.app.Activity;
import android.content.Intent;
import android.support.v4.view.ViewPager;
import android.view.Menu;

public class ShowViewPagerActivity extends BaseActivity {

	List<String> list;
	ViewPager tabpager;
	int position;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		goToTheTitle();
		setContentView(R.layout.activity_show_view_pager);

		position = getIntent().getIntExtra("position", 1);
		list = getIntent().getStringArrayListExtra("pic");
//		 LogUtils.d("运行到了这里 29="+list.size());
		tabpager = (ViewPager) this.findViewById(R.id.tabpager);
		// tabpager.setCurrentItem(0);
		// LogUtils.d("运行到了这里 31");

		tabpager.setAdapter(new MyViewPageAdapter(ShowViewPagerActivity.this,
				list));
		tabpager.setCurrentItem((position));
//		LogUtils.i("position=" + position);
	}

}
